/**
 * @Author YuanYuan
 * @Date 2022/4/29
 * @Time 15:18
 */
public class TestDemo {
    public static int sum(int n) {
        if(n == 1) {
            return 1;
        }else {
            return n + sum(n-1);
        }
    }
    public static void main(String[] args) {
        System.out.println(sum(10));
    }
}
